package com.originskyseed.platform.task.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.originskyseed.platform.task.model.TaskRelateMaintainUser;

/**
 * 任务关联维护用户表Mapper类（OSI_TASK_RELATE_MAINTAIN_USER）
 *
 * @author wlj
 */
public interface TaskRelateMaintainUserMapper {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(TaskRelateMaintainUser record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(TaskRelateMaintainUser record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(TaskRelateMaintainUser record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(TaskRelateMaintainUser record) throws Exception;

	/**
	 * 主播在线状态修改
	 *
	 * @param list
	 * @param isOnline
	 * @return
	 * @throws Exception
	 */
	public int updateAnchorOnlineByList(@Param("list")List<String> list, @Param("isOnline")Integer isOnline) throws Exception;


	/**
	 * 主播在线状态修改
	 *
	 * @param list
	 * @param isOnline
	 * @return
	 * @throws Exception
	 */
	public int updateAnchorOnlineByAnchorIdList(@Param("list")List<String> list, @Param("isOnline")Integer isOnline) throws Exception;

	/**
	 * 根据taskId更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateBytaskId(TaskRelateMaintainUser record) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public TaskRelateMaintainUser selectByPrimaryKey(String id) throws Exception;

	/**
	 * 根据任务ID查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public TaskRelateMaintainUser selectByTaskId(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<TaskRelateMaintainUser> selectList(TaskRelateMaintainUser record) throws Exception;

	/**
	 * 判断主播是否在线
	 *
	 * @param userType
	 * @return
	 * @throws Exception
	 */
	public List<TaskRelateMaintainUser> selectAnchorIsOnlineList(@Param("userType") Integer userType) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<TaskRelateMaintainUser> selectListByPage(Map<String, Object> params) throws Exception;

}
